//
//  JianKangDaoAnReportTableViewCell.m
//  1gene
//
//  Created by 张国文 on 16/7/5.
//  Copyright © 2016年 1jiyin. All rights reserved.
//

#import "JianKangDaoAnReportTableViewCell.h"

@implementation JianKangDaoAnReportTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addMySubview];
    }
    return self;
}

#pragma mark - 布局
- (void)addMySubview
{
    // 前方标记
    self.biaoJiLable = [[UILabel alloc] initWithFrame:CGRectMake(15 * kAdjustParamater, 22 * kAdjustParamater, 60 * kAdjustParamater, 25 * kAdjustParamater)];
    self.biaoJiLable.backgroundColor = kCyanColor;
    self.biaoJiLable.textAlignment = NSTextAlignmentCenter;
    self.biaoJiLable.textColor = [UIColor whiteColor];
    self.biaoJiLable.font = [UIFont fontWithName:@"Arial-BoldMT" size:k16Big];
    self.biaoJiLable.layer.cornerRadius = 5 * kAdjustParamater;
    self.biaoJiLable.layer.masksToBounds = YES;
    [self.contentView addSubview:_biaoJiLable];
    
    // 报告的名字
    self.jianKangReportLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.biaoJiLable.right + 10 * kAdjustParamater, 15 * kAdjustParamater, 280 * kAdjustParamater, 15 * kAdjustParamater)];
  //  self.jianKangReportLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
    self.jianKangReportLabel.textColor = [UIColor blackColor];
    self.jianKangReportLabel.textAlignment = NSTextAlignmentLeft;
    self.jianKangReportLabel.font = [UIFont systemFontOfSize:k16Big];
    [self.contentView addSubview:_jianKangReportLabel];
    
    // 报告出的时间
    self.jianKangReportTime = [[UILabel alloc] initWithFrame:CGRectMake(self.jianKangReportLabel.left, self.jianKangReportLabel.bottom + 10 * kAdjustParamater, 280 * kAdjustParamater, 15 * kAdjustParamater)];
   // self.jianKangReportTime.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
    self.jianKangReportTime.textColor = [[UIColor blackColor] colorWithAlphaComponent:0.7];
    self.jianKangReportTime.textAlignment = NSTextAlignmentLeft;
    self.jianKangReportTime.font = [UIFont systemFontOfSize:k13Big];
    [self.contentView addSubview:_jianKangReportTime];
    
}

- (void)setModel:(ZGWPeopleAllReportModel *)model
{
    self.jianKangReportLabel.text = model.reportName;
    self.jianKangReportTime.text = model.updated_at;
    self.biaoJiLable.text = model.reportNumber;
}

@end
